﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Web.Api.Server.Models
{
    [Table(Name = "OrderDetails")]
    public class OrderDetail
    {
        [Column(Name = "id", IsIdentity = true)]
        public int Id { get; set; }

        [Column(Name = "goods_id")]
        public int GoodsId { get; set; }

        [Column(Name = "goods_name", StringLength = 255)]
        public string GoodsName { get; set; }

        [Column(Name = "number")]
        public int Number { get; set; }

        [Column(Name = "price")]
        public decimal Price { get; set; }

        [Column(Name = "order_id")]
        public int OrderId { get; set; }

        [Column(Name = "created_at", IsNullable = true)]
        public DateTime? CreatedAt { get; set; } = DateTime.Now;

        [Column(Name = "updated_at", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; } = DateTime.Now;
    }
}
